package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ISubmitTaskActivityModel;
import com.wgts.wgts.mvp.model.imp.SubmitTaskActivityModel;
import com.wgts.wgts.mvp.presenter.ISubmitTaskActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.SubmitTaskActivityPresenter;
import com.wgts.wgts.mvp.view.ISubmitTaskActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 */
@Module
public class SubmitTaskActivityModule {
    private ISubmitTaskActivityView view;

    public SubmitTaskActivityModule(ISubmitTaskActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public ISubmitTaskActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public ISubmitTaskActivityModel provideModel(NetService netService){
        return new SubmitTaskActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public ISubmitTaskActivityPresenter providePresenter (ISubmitTaskActivityView view, ISubmitTaskActivityModel model){
        return new SubmitTaskActivityPresenter(view, model);
    }
}
